Skip to content

feat: add ssh-stateless bundled extension#8301

Closed
fresh3nough wants to merge 1 commit into
aaif-goose:mainfrom
fresh3nough:ssh-stateless
Closed

feat: add ssh-stateless bundled extension#8301
fresh3nough wants to merge 1 commit into
aaif-goose:mainfrom
fresh3nough:ssh-stateless

Conversation

@fresh3nough
Copy link
Copy Markdown
Contributor

@fresh3nough fresh3nough commented Apr 4, 2026

Summary

  • add the built-in ssh-stateless extension and its Python implementation
  • register the extension in bundled extension metadata for the desktop app and settings UI
  • add Python and TypeScript tests for the new bundled extension

a la warp mode

Signed-off-by: fre <anonwurcod@proton.me>
Co-Authored-By: Oz <oz-agent@warp.dev>
@fresh3nough fresh3nough closed this Apr 4, 2026
@fresh3nough fresh3nough reopened this Apr 4, 2026
@fresh3nough
Copy link
Copy Markdown
Contributor Author

working on this if it is of interest @DOsinga if not i will keep for myself

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7738a80169

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +1 to +4
#!/bin/busybox sh
set -eu

SCRIPT_DIR=$(/bin/busybox dirname "$0")
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Use a portable shell interpreter for ssh-stateless shim

The shim hardcodes /bin/busybox both as the interpreter and for dirname; on systems where that exact path is missing (common on macOS and many Linux setups), the command fails before any extension logic runs with a "No such file or directory" startup error. That makes ssh-stateless-mcp unusable in those environments even though the extension is enabled by default.

Useful? React with 👍 / 👎.

Comment on lines +13 to +14
PROJECT_DIR="${REPO_ROOT}/extensions/ssh-stateless"
SERVER_SCRIPT="${PROJECT_DIR}/ssh_stateless.py"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Resolve ssh-stateless project path for packaged app layout

This path resolution assumes a source-tree layout (.../extensions/ssh-stateless) by walking up from the shim location, which works in dev but not in packaged desktop builds. I checked ui/desktop/forge.config.ts and only src/bin/src/images are packaged as extra resources, so the Python project directory is not present there and the shim exits with "missing server script", breaking the bundled extension in production installs.

Useful? React with 👍 / 👎.

Comment on lines +69 to +71
_, stdout, stderr = client.exec_command(command)
parts = [_read_stream(stdout).strip(), _read_stream(stderr).strip()]
return "\n".join(part for part in parts if part).strip()
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Report failure when remote SSH command exits non-zero

The tool currently returns combined stdout/stderr without checking the command exit status, so a failing command with no stderr output (for example false) is returned as an empty successful response. This can make the agent treat failed remote operations as success and continue with incorrect state; the exit code from the SSH channel should be validated and surfaced as an error.

Useful? React with 👍 / 👎.

@michaelneale
Copy link
Copy Markdown
Collaborator

hi @fresh3nough - not sure this should be bundled like this - could be a separate mcp, but as a bundled bit of python doesn't seem to fit. Is there a better place for this?

@fresh3nough
Copy link
Copy Markdown
Contributor Author

@michaelneale gotcha, yes i agree -> Extract the SSH logic into a standalone MCP server package is the way to go, i will get started on this today

fresh3nough pushed a commit to fresh3nough/goose that referenced this pull request Apr 6, 2026
Add a stateless SSH MCP extension that runs one-shot SSH commands over
fresh connections with no persisted session state.

This follows the idiomatic MCP extension pattern:
- Proper Python package structure (src layout) with pyproject.toml
- Entry point for uvx: mcp-ssh-stateless
- Bundled as a stdio extension using uvx mcp-ssh-stateless@latest
- Disabled by default (opt-in for users who need SSH)

The extension provides a single ssh_exec tool that accepts host, username,
command, and either password or key_path authentication.

Closes aaif-goose#8293
Supersedes aaif-goose#8301 (which bundled a raw Python script + busybox shim)

Co-Authored-By: Oz <oz-agent@warp.dev>
Signed-off-by: Oz <oz-agent@warp.dev>
@fresh3nough fresh3nough closed this Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants